The agent recalls how it solved a similar task last week, instead of starting from scratch.
Solve Track 03 · Recall. Agent-Recall stores solutions after task completion (goal, approach, outcome, confidence) and searches for matches when a new task arrives using keyword-overlap similarity. It injects prior knowledge straight into the prompt, preventing developers and agents from reinventing the wheel. Extracted from 18 months of production Agentic OS.
AI agents are stateless by design. They enter every new task with zero awareness of what they accomplished in the prior session. If an agent is asked to write a CSV parser, debug a port conflict, or integrate a specific API, it starts from first principles. It writes the code from scratch, rediscovers the same quirks, and wastes expensive LLM tokens rewriting boilerplate.
In production systems, this statelessness is highly inefficient. Developers don't work this way; they check their history, copy snippets of what worked, and adapt old templates. Agent-Recall gives agents a local memory bank of past successes. If the agent completes a task successfully, the solution is recorded. If a similar goal is submitted, the system fetches the old approach and forces the agent to read it before writing new code.
./data/solutions.json. The record stores four critical fields: the prompt goal, the technical approach (what modules were used), the outcome (the success state), and a confidence score.
0.3), the solution is flagged.
Agent-Recall uses keyword tokenization instead of semantic vector databases in its standard mode. This allows it to work entirely offline, with zero latency and zero dependency on external embedding providers.
Goal A: "Write a CSV parser" -> tokens: [write, csv, parser]
Goal B: "Parse a CSV file" -> tokens: [parse, csv, file]
Intersection: {csv} = 1
Max set length: max(3, 3) = 3
Similarity: 1 / 3 = 0.33 (33%)
### RECALL: Similar Task Found in Memory Similarity: 68% Prior Goal: Write a function to parse CSV files in Node.js How it was solved: Used fs.readFileSync, split by newlines, then by comma. Handled quoted fields with regex. Outcome: Working CSV parser, 40 lines, handles edge cases Confidence: 90% Consider this approach before starting from scratch. ### END RECALL
git clone https://github.com/shubham0086/Agent-Recall cd Agent-Recall npm install # Run the memory demo script node demo/recall.js
import { Recall } from 'agent-recall';
// 1. Instantiate with workspace identifier
const memory = new Recall('my-workspace');
// 2. Store a successful task solution
await memory.storeSolution(
"Parse CSV strings into arrays",
"Used line split and regex commas",
"Completed successfully, 12 test cases passed",
95
);
// 3. Search recall context for new task
const context = await memory.buildRecallContext("Parse values from a raw CSV file");
if (context) {
console.log("Prepending context block to prompt...");
}
Agent-Recall represents the cross-session memory layer of the autonomy ladder. It implements Pattern 03 (Reality-First Memory) in Agentic Patterns. In production engines, this works alongside Agent-Scars (which tracks failures) to form the dual-memory stack inside AgentKernel.
Since this Jaccard overlap relies on matching words, synonyms can cause misses. If Goal A is "Fetch web pages" and Goal B is "Retrieve HTML content", the Jaccard similarity is zero, even though they describe the same task. The v2 roadmap incorporates local, light-weight semantic embedding models (like transformers.js) to resolve this limitation. However, in standard developer workloads, using consistent vocabulary (like "GET", "fetch", "auth", "validate") yields matching rates above 80% with zero overhead.